namespace RuoVea.OmiApi.SystemApp.SeedData;

/// <summary>
/// 系统菜单表种子数据
/// </summary>
public class SysMenu_SeedData : SeedDataEntity<SysMenu>
{
    /// <summary>
    /// 种子数据
    /// </summary>
    /// <returns></returns>
    public IList<SysMenu> HasData()
    {
        return new[]
        {
          new SysMenu{ Id=1300000000101, Pid=0, Title="工作台", Path="/dashboard", Name="dashboard", Component="/dashboard", Icon="el-icon-s-home", Type=MenuType.DIR, CreateTime=DateTime.Now, Sort=0 , IsDelete = 0},
          new SysMenu{ Id=1300000000111, Pid=1300000000101, Title="工作台", Path="/home", Name="home", Component="/dashboard/home/index", IsAffix=true, Icon="el-icon-s-home", Type=MenuType.MENU, CreateTime=DateTime.Now, Sort=100, IsDelete=0 },


          new SysMenu{ Id=1310000000101, Pid=0, Title="系统管理", Path="/system", Name="system", Component="/system", Icon="el-icon-setting", Type=MenuType.DIR, CreateTime=DateTime.Now, Sort=10000, IsDelete=0 },

          new SysMenu{ Id=1310000000111, Pid=1310000000101, Title="账号管理", Path="/user", Name="user", Component="/system/user/index", Icon="el-icon-user", Type=MenuType.MENU, CreateTime=DateTime.Now, Sort=100, IsDelete=0 },
          new SysMenu{ Id=1310000000112, Pid=1310000000111, Title="查询", Permission="sysUser:page", Type=MenuType.BTN, CreateTime=DateTime.Now, Sort=100, IsDelete=0 },
          new SysMenu{ Id=1310000000113, Pid=1310000000111, Title="详情", Permission="sysUser:userById", Type=MenuType.BTN, CreateTime=DateTime.Now, Sort=100 , IsDelete=0},
          new SysMenu{ Id=1310000000114, Pid=1310000000111, Title="编辑", Permission="sysUser:updateUser", Type=MenuType.BTN, CreateTime=DateTime.Now, Sort=100, IsDelete=0 },
          new SysMenu{ Id=1310000000115, Pid=1310000000111, Title="增加", Permission="sysUser:addUser", Type=MenuType.BTN, CreateTime=DateTime.Now, Sort=100 , IsDelete=0},
          new SysMenu{ Id=1310000000116, Pid=1310000000111, Title="删除", Permission="sysUser:deleteUser", Type=MenuType.BTN, CreateTime=DateTime.Now, Sort=100 , IsDelete=0},
          new SysMenu{ Id=1310000000117, Pid=1310000000111, Title="重置密码", Permission="sysUser:resetPwd", Type=MenuType.BTN, CreateTime=DateTime.Now, Sort=100 , IsDelete=0},
          new SysMenu{ Id=1310000000118, Pid=1310000000111, Title="授权角色", Permission="sysUser:grantRole", Type=MenuType.BTN, CreateTime=DateTime.Now, Sort=100 , IsDelete=0},

          new SysMenu{ Id=1310000000131, Pid=1310000000101, Title="角色管理", Path="/role", Name="role", Component="/system/role/index", Icon="el-icon-help", Type=MenuType.MENU, CreateTime=DateTime.Now, Sort=110, IsDelete=0 },
          new SysMenu{ Id=1310000000132, Pid=1310000000131, Title="查询", Permission="sysRole:page", Type=MenuType.BTN, CreateTime=DateTime.Now, Sort=100 , IsDelete=0},
          new SysMenu{ Id=1310000000133, Pid=1310000000131, Title="编辑", Permission="sysRole:updateRole", Type=MenuType.BTN, CreateTime=DateTime.Now, Sort=100 , IsDelete=0},
          new SysMenu{ Id=1310000000134, Pid=1310000000131, Title="增加", Permission="sysRole:addRole", Type=MenuType.BTN, CreateTime=DateTime.Now, Sort=100, IsDelete=0 },
          new SysMenu{ Id=1310000000135, Pid=1310000000131, Title="删除", Permission="sysRole:deleteRole", Type=MenuType.BTN, CreateTime=DateTime.Now, Sort=100, IsDelete=0 },
          new SysMenu{ Id=1310000000136, Pid=1310000000131, Title="授权菜单", Permission="sysRole:grantMenu", Type=MenuType.BTN, CreateTime=DateTime.Now, Sort=100 , IsDelete=0},
          new SysMenu{ Id=1310000000137, Pid=1310000000131, Title="数据范围", Permission="sysRole:grantDataScope", Type=MenuType.BTN, CreateTime=DateTime.Now, Sort=100 , IsDelete=0},
          new SysMenu{ Id=1310000000138, Pid=1310000000131, Title="角色用户", Permission="sysRole:roleUser", Type=MenuType.BTN, CreateTime=DateTime.Now, Sort=100, IsDelete=0 },
          new SysMenu{ Id=1310000000139, Pid=1310000000131, Title="修改状态", Permission="sysRole:setStatus", Type=MenuType.BTN, CreateTime=DateTime.Now, Sort=100 , IsDelete=0},

          new SysMenu{ Id=1310000000141, Pid=1310000000101, Title="机构管理", Path="/organization", Name="organization", Component="/system/organization/index", Icon="el-icon-office-building", Type=MenuType.MENU, CreateTime=DateTime.Now, Sort=120 , IsDelete=0},
          new SysMenu{ Id=1310000000142, Pid=1310000000141, Title="查询", Permission="sysOrg:list", Type=MenuType.BTN, CreateTime=DateTime.Now, Sort=100 , IsDelete=0},
          new SysMenu{ Id=1310000000143, Pid=1310000000141, Title="编辑", Permission="sysOrg:updateOrg", Type=MenuType.BTN, CreateTime=DateTime.Now, Sort=100 , IsDelete=0},
          new SysMenu{ Id=1310000000144, Pid=1310000000141, Title="增加", Permission="sysOrg:addOrg", Type=MenuType.BTN, CreateTime=DateTime.Now, Sort=100, IsDelete=0 },
          new SysMenu{ Id=1310000000145, Pid=1310000000141, Title="删除", Permission="sysOrg:deleteOrg", Type=MenuType.BTN, CreateTime=DateTime.Now, Sort=100 , IsDelete=0},

          new SysMenu{ Id=1310000000151, Pid=1310000000101, Title="职位管理", Path="/position", Name="position", Component="/system/position/index", Icon="el-icon-s-custom", Type=MenuType.MENU, CreateTime=DateTime.Now, Sort=130 , IsDelete=0},
          new SysMenu{ Id=1310000000152, Pid=1310000000151, Title="查询", Permission="sysPos:list", Type=MenuType.BTN, CreateTime=DateTime.Now, Sort=100 , IsDelete=0},
          new SysMenu{ Id=1310000000153, Pid=1310000000151, Title="编辑", Permission="sysPos:updatePos", Type=MenuType.BTN, CreateTime=DateTime.Now, Sort=100, IsDelete=0 },
          new SysMenu{ Id=1310000000154, Pid=1310000000151, Title="增加", Permission="sysPos:addPos", Type=MenuType.BTN, CreateTime=DateTime.Now, Sort=100, IsDelete=0 },
          new SysMenu{ Id=1310000000155, Pid=1310000000151, Title="删除", Permission="sysPos:deletePos", Type=MenuType.BTN, CreateTime=DateTime.Now, Sort=100 , IsDelete=0},


          new SysMenu{ Id=1310000000301, Pid=0, Title="平台管理", Path="/platform", Name="platform", Component="/platform", Icon="el-icon-menu", Type=MenuType.DIR, CreateTime=DateTime.Now, Sort=11000, IsDelete=0},
          new SysMenu{ Id=1310000000321, Pid=1310000000301, Title="菜单管理", Path="/menu", Name="menu", Component="/system/menu/index", Icon="el-icon-menu", Type=MenuType.MENU, CreateTime=DateTime.Now, Sort=110 , IsDelete=0},
          new SysMenu{ Id=1310000000322, Pid=1310000000321, Title="查询", Permission="sysMenu:list", Type=MenuType.BTN, CreateTime=DateTime.Now, Sort=100 , IsDelete=0},
          new SysMenu{ Id=1310000000323, Pid=1310000000321, Title="编辑", Permission="sysMenu:updateMenu", Type=MenuType.BTN, CreateTime=DateTime.Now, Sort=100, IsDelete=0 },
          new SysMenu{ Id=1310000000324, Pid=1310000000321, Title="增加", Permission="sysMenu:addMenu", Type=MenuType.BTN, CreateTime=DateTime.Now, Sort=100 , IsDelete=0},
          new SysMenu{ Id=1310000000325, Pid=1310000000321, Title="删除", Permission="sysMenu:deleteMenu", Type=MenuType.BTN, CreateTime=DateTime.Now, Sort=100, IsDelete=0 },

        #region 参数配置
		  new SysMenu{ Id=1310000000331, Pid=1310000000301, Title="参数配置", Path="/config", Name="config", Component="/system/config/index", Icon="el-icon-document-copy", Type=MenuType.MENU, CreateTime=DateTime.Now, Sort=120 , IsDelete=0},
          new SysMenu{ Id=1310000000332, Pid=1310000000331, Title="查询", Permission="sysConfig:pages", Type=MenuType.BTN, CreateTime=DateTime.Now, Sort=100 , IsDelete=0},
          new SysMenu{ Id=1310000000333, Pid=1310000000331, Title="详情", Permission="sysConfig:data", Type=MenuType.BTN, CreateTime=DateTime.Now, Sort=200, IsDelete=0 },
          new SysMenu{ Id=1310000000334, Pid=1310000000331, Title="编辑", Permission="sysConfig:updateData", Type=MenuType.BTN, CreateTime=DateTime.Now, Sort=300 , IsDelete=0},
          new SysMenu{ Id=1310000000335, Pid=1310000000331, Title="增加", Permission="sysConfig:addData", Type=MenuType.BTN, CreateTime=DateTime.Now, Sort=400, IsDelete=0 },
          new SysMenu{ Id=1310000000336, Pid=1310000000331, Title="删除", Permission="sysConfig:deleteData", Type=MenuType.BTN, CreateTime=DateTime.Now, Sort=500 , IsDelete=0},
          new SysMenu{ Id=1310000000337, Pid=1310000000331, Title="批量删除", Permission="sysConfig:batchDelete", Type=MenuType.BTN, CreateTime=DateTime.Now, Sort=600 , IsDelete=0}, 
	    #endregion

        #region 字典管理
		  new SysMenu{ Id=1310000000441, Pid=1310000000301, Title="字典管理", Path="/dict", Name="dicttyp", Component="/system/dicttyp/index", Icon="el-icon-collection", Type=MenuType.MENU, CreateTime=DateTime.Now, Sort=130 , IsDelete=0},
          new SysMenu{ Id=1310000000442, Pid=1310000000441, Title="查询", Permission="sysDictType:pages", Type=MenuType.BTN, CreateTime=DateTime.Now, Sort=100, IsDelete=0 },
          new SysMenu{ Id=1310000000443, Pid=1310000000441, Title="详情", Permission="sysDictType:data", Type=MenuType.BTN, CreateTime=DateTime.Now, Sort=100, IsDelete=0 },
          new SysMenu{ Id=1310000000444, Pid=1310000000441, Title="编辑", Permission="sysDictType:updateData", Type=MenuType.BTN, CreateTime=DateTime.Now, Sort=100, IsDelete=0 },
          new SysMenu{ Id=1310000000445, Pid=1310000000441, Title="增加", Permission="sysDictType:addData", Type=MenuType.BTN, CreateTime=DateTime.Now, Sort=100, IsDelete=0 },
          new SysMenu{ Id=1310000000446, Pid=1310000000441, Title="删除", Permission="sysDictType:deleteData", Type=MenuType.BTN, CreateTime=DateTime.Now, Sort=100 , IsDelete=0},
          new SysMenu{ Id=1310000000447, Pid=1310000000441, Title="字典值", Permission="sysDictType:dicValue", Type=MenuType.BTN, CreateTime=DateTime.Now, Sort=100 , IsDelete=0},
          new SysMenu{ Id=1310000000448, Pid=1310000000441, Title="更新状态", Permission="sysDictType:changeStatus", Type=MenuType.BTN, CreateTime=DateTime.Now, Sort=100 , IsDelete=0},

          new SysMenu{ Id=1310000000451, Pid=1310000000301, Title="字典值", Path="/dict", Name="dictvalue", Component="/system/dictvalue/index", Icon="el-icon-collection", Type=MenuType.MENU, CreateTime=DateTime.Now, Sort=140, IsHide=true, IsDelete=0 },
          new SysMenu{ Id=1310000000452, Pid=1310000000451, Title="查询", Permission="sysDictValue:pages", Type=MenuType.BTN, CreateTime=DateTime.Now, Sort=100 , IsDelete=0},
          new SysMenu{ Id=1310000000453, Pid=1310000000451, Title="详情", Permission="sysDictValue:data", Type=MenuType.BTN, CreateTime=DateTime.Now, Sort=100, IsDelete=0 },
          new SysMenu{ Id=1310000000454, Pid=1310000000451, Title="编辑", Permission="sysDictValue:updateData", Type=MenuType.BTN, CreateTime=DateTime.Now, Sort=100 , IsDelete=0},
          new SysMenu{ Id=1310000000455, Pid=1310000000451, Title="增加", Permission="sysDictValue:addData", Type=MenuType.BTN, CreateTime=DateTime.Now, Sort=100, IsDelete=0 },
          new SysMenu{ Id=1310000000456, Pid=1310000000451, Title="删除", Permission="sysDictValue:deleteData", Type=MenuType.BTN, CreateTime=DateTime.Now, Sort=100 , IsDelete=0},
          new SysMenu{ Id=1310000000457, Pid=1310000000451, Title="更新状态", Permission="sysDictValue:changeStatus", Type=MenuType.BTN, CreateTime=DateTime.Now, Sort=100 , IsDelete=0}, 
	    #endregion

        #region 日志管理
		  new SysMenu{ Id=1310000000501, Pid=0, Title="日志管理", Path="/log", Name="log", Component="/log", Icon="el-icon-notebook-2", Type=MenuType.DIR, CreateTime=DateTime.Now, Sort=12000 , IsDelete=0},

          new SysMenu{ Id=1310000000511, Pid=1310000000501, Title="访问日志", Path="/logvis", Name="logvis", Component="/system/log/logvis/index", Icon="el-icon-tickets", Type=MenuType.MENU, CreateTime=DateTime.Now, Sort=100, IsDelete=0 },
          new SysMenu{ Id=1310000000512, Pid=1310000000511, Title="查询", Permission="sysLogVis:pages", Type=MenuType.BTN, CreateTime=DateTime.Now, Sort=100, IsDelete=0 },
          new SysMenu{ Id=1310000000513, Pid=1310000000511, Title="详情", Permission="sysLogVis:data", Type=MenuType.BTN, CreateTime=DateTime.Now, Sort=100 , IsDelete=0},
          new SysMenu{ Id=1310000000514, Pid=1310000000511, Title="清空", Permission="sysLogVis:clear", Type=MenuType.BTN, CreateTime=DateTime.Now, Sort=100 , IsDelete=0},

          new SysMenu{ Id=1310000000521, Pid=1310000000501, Title="操作日志", Path="/logop", Name="logop", Component="/system/log/logop/index", Icon="el-icon-edit", Type=MenuType.MENU, CreateTime=DateTime.Now, Sort=110 , IsDelete=0},
          new SysMenu{ Id=1310000000522, Pid=1310000000521, Title="查询", Permission="sysLogOp:pages", Type=MenuType.BTN, CreateTime=DateTime.Now, Sort=100, IsDelete=0 },
          new SysMenu{ Id=1310000000523, Pid=1310000000521, Title="清空", Permission="sysLogOp:clear", Type=MenuType.BTN, CreateTime=DateTime.Now, Sort=100 , IsDelete=0},
          new SysMenu{ Id=1310000000524, Pid=1310000000521, Title="导出", Permission="sysLogOp:export", Type=MenuType.BTN, CreateTime=DateTime.Now, Sort=100 , IsDelete=0},
          new SysMenu{ Id=1310000000525, Pid=1310000000521, Title="详情", Permission="sysLogOp:data", Type=MenuType.BTN, CreateTime=DateTime.Now, Sort=100 , IsDelete=0},
          new SysMenu{ Id=1310000000526, Pid=1310000000521, Title="删除", Permission="sysLogOp:deleteData", Type=MenuType.BTN, CreateTime=DateTime.Now, Sort=100 , IsDelete=0},

          new SysMenu{ Id=1310000000531, Pid=1310000000501, Title="异常日志", Path="/exlog", Name="logex", Component="/system/log/logex/index", Icon="el-icon-warning-outline", Type=MenuType.MENU, CreateTime=DateTime.Now, Sort=120 , IsDelete=0},
          new SysMenu{ Id=1310000000532, Pid=1310000000531, Title="查询", Permission="sysLogEx:pages", Type=MenuType.BTN, CreateTime=DateTime.Now, Sort=100, IsDelete=0 },
          new SysMenu{ Id=1310000000533, Pid=1310000000531, Title="清空", Permission="sysLogEx:clear", Type=MenuType.BTN, CreateTime=DateTime.Now, Sort=100 , IsDelete=0},
          new SysMenu{ Id=1310000000534, Pid=1310000000531, Title="导出", Permission="sysLogEx:export", Type=MenuType.BTN, CreateTime=DateTime.Now, Sort=100 , IsDelete=0},
          new SysMenu{ Id=1310000000535, Pid=1310000000531, Title="详情", Permission="sysLogEx:data", Type=MenuType.BTN, CreateTime=DateTime.Now, Sort=100, IsDelete=0 },

          new SysMenu{ Id=1310000000541, Pid=1310000000501, Title="差异日志", Path="/difflog", Name="logdiff", Component="/system/log/logdiff/index", Icon="el-icon-notebook-1", Type=MenuType.MENU, CreateTime=DateTime.Now, Sort=130, IsDelete=0 },
          new SysMenu{ Id=1310000000542, Pid=1310000000541, Title="查询", Permission="sysLogDiff:pages", Type=MenuType.BTN, CreateTime=DateTime.Now, Sort=100, IsDelete=0 },
          new SysMenu{ Id=1310000000543, Pid=1310000000541, Title="详情", Permission="sysLogDiff:data", Type=MenuType.BTN, CreateTime=DateTime.Now, Sort=100, IsDelete=0 },
          new SysMenu{ Id=1310000000544, Pid=1310000000541, Title="清空", Permission="sysLogDiff:clear", Type=MenuType.BTN, CreateTime=DateTime.Now, Sort=100 , IsDelete=0}, 
	    #endregion
        };
    }

    /// <summary>
    /// Web菜单种子数据
    /// </summary>
    /// <returns></returns>
    public IList<SysMenu> HasDataWeb()
    {
        var sysMenus = HasData();
        var menus = new List<SysMenu>();
        foreach (var item in sysMenus)
        {
            if (item.Id == 1310000000441)
            {
                item.Path = "/dicttype/index";
                menus.Add(item);
            }
            else if (item.Id == 1310000000451 || item.Pid == 1310000000451)
            {

            }
            else if (item.Id == 1300000000111)
            {
                item.Path = "/dashboard/index";
                menus.Add(item);
            }
            else if (item.Id == 1310000000531)
            {
                item.Path = "/logex/index";
                menus.Add(item);
            }
            else if (item.Id == 1310000000541)
            {
                item.Path = "/logdiff/index";
                menus.Add(item);
            }
            else
            {
                if (item.Path.NotNullOrWhiteSpace()&&item.Pid>0)
                    item.Path = item.Path + "/index";
                menus.Add(item);
            }
        }
        return menus;
    }
}